package com.libre.common.enums;

import lombok.Getter;


/**
* @description   返回信息枚举类
* @author        庞留杰
* @date          2020/7/16 19:08
* @version       V1.0
**/
@Getter
public enum ResultEnum {
    /**
    * 功能描述: 状态码枚举所有状态码注解
    * @author: 庞留杰
    * @date:   2020/7/16 19:09
    */
    // 系统相关
    OK("200", "OK", "操作成功"),
    FAIL("10001", "Operation Failure", "操作失败"),
    PARAMETER_ERROR("10002", "Parameter Error", "参数错误"),

    PASSWORD_RESET_SUCCESSFULLY("10003", "Password Reset Successfully", "重置密码成功"),
    USER_NO_LOGIN("20002", "User Is Not Logged In", "用户未登录"),
    LOGIN_PASSWORD_ERROR("20003", "Login Password Error", "登录密码错误"),
    OLD_PASSWORD_ERROR("20004", "Old Password Error", "旧密码错误"),
    PASSWORD_RESET_FAILED("20005", "Password Reset Failed", "重置密码失败"),
    USER_NAME_ALREADY_EXISTS("20006", "User Name Already Exists", "用户名已存在"),
    ACCOUNT_LOCKED("20007", "Account Locked", "账户被锁定，请联系管理员"),
    PASSWORD_EXPIRED("20008", "Password Expired", "密码过期，请联系管理员"),
    LOGGED_IN_BUT_NO_PERMISSION("20009", "Logged In But No Permission", "用户已登录，但无权限访问该资源"),

    INTERNAL_SERVER_ERROR("500", "Internal Server Error", "服务器内部错误"),

    // 登陆授权相关
    VERIFICATION_CODE_EMPTY("20001", "Please Enter A Verification Code", "请输入验证码"),
    VERIFICATION_CODE_FAILURE("20002", "Verification Code Is Invalid, Please Refresh And Try Again", "验证码失效，请刷新后重试"),
    VERIFICATION_CODE_ERROR("20003", "Verification Code Error", "验证码错误"),
    QUERY_FOR_USER_INFORMATION_EXCEPTIONS("20004", "Query For User Information Exceptions", "查询用户信息异常"),
    THE_USER_DOES_NOT_EXIST("20005", "The User Does Not Exist, Please Contact Admin To Add", "用户不存在，请联系管理添加"),
    USER_HAS_BEEN_DISABLED("20006", "The Current User Has Been Disabled, Please Contact Your Administrator", "当前用户已被禁用，请联系管理员处理"),
    LOG_IN_SUCCESSFULLY("20007", "Log In Successfully", "登陆成功"),
    LOG_IN_FAILED("20022", "Log In Failed", "登陆失败"),
    LOGOUT_SUCCESS("20008", "Logout Success", "登出成功"),
    LOGOUT_FAILED("20009", "Logout Failed", "登出失败"),
    NOT_LOGGED_IN("20010", "Not Logged In, Please Log In Again", "未登录，请重新登录"),
    TOKEN_EXCEPTION("20011", "Token Exception, Please Login Again", "TOKEN异常，请重新登录"),
    RESOLVE_TOKEN_FAILURE("20012", "Resolve Token Failure, Please Login Again", "解析TOKEN失败，请重新登录"),
    LOGIN_HAS_EXPIRED("20013", "Login Has Expired, Please Login Again", "登录已失效，请重新登陆"),
    AUTHORIZATION_SUCCESS("20014", "Authorization Success", "授权成功"),
    USER_NO_PERMISSIONS("20015", "This User Has No Permissions", "该用户无权限"),
    USER_CODE_ALREADY_EXISTS("20021", "User Code Already Exists", "用户编号已存在"),
    ;

    String code; //状态码
    String reasonPhraseUS;//英文,首字母大写，中间一个空格隔开
    String reasonPhraseCN;//中文

    ResultEnum(String code, String reasonPhraseUS, String reasonPhraseCN) {
        this.code = code;
        this.reasonPhraseUS = reasonPhraseUS;
        this.reasonPhraseCN = reasonPhraseCN;
    }

}